﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DataAccessLayer
{
    public class VoucherRepository : Repository<Voucher>
    {
        public override Voucher FindById(int id)
        {
            return GetAll().SingleOrDefault(o => o.ID == id);
        }

        public Voucher FindByVourcherNumber(string voucherNumber)
        {
            return _context.Vouchers.FirstOrDefault(o => o.VoucherNumber.Equals(voucherNumber));
        }
    }
}
